<?php
class App {
	
	function import($type, $class) {
		$path = null;
		$type = strtolower($type);

		switch($type) {
			case 'controller':
				$path = CONTROLLERS . Inflector::underscore($class) . '_controller.php';
			break;
			case 'core':
				$path = LIBS . Inflector::underscore($class) . '.php';    
				echo $path;
			break;
		}
		
		if($path && file_exists($path)) {
			include $path;
			return true;
		} 
		return false;		
	}
	
}
?>